import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/home/Home.vue'
import About from '@/views/about/About.vue'
import Discuss from '@/views/discuss/Discuss.vue'
import Study from '@/views/study/Study.vue'
import Train from '@/views/train/Train.vue'
import ArticleInfo from '@/components/ArticleInfo.vue'
import Album from '@/views/album/Album.vue'
import AlbumDetail from '@/views/album/AlbumDetail.vue'
import LangColle from '@/views/lancoll/LangColle.vue'
import DiscussDetail from '@/views/discuss/DiscussDetail.vue'
import TrainDetail from '@/views/train/TrainDetail.vue'
import Account from '@/views/about/Account.vue'
import Edit from '@/views/edit/Edit.vue'
import StudyDetail from '@/views/study/StudyDetail.vue'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '*',
      redirect: '/'
    },
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/study',
      name: 'Study',
      component: Study
    },
    {
      path: '/studyDetail/:id',
      name: 'StudyDetail',
      component: StudyDetail
    },
    {
      path: '/train',
      name: 'Train',
      component: Train
    },
    {
      path: '/train/detail/:id',
      name: 'TrainDetail',
      component: TrainDetail
    },
    {
      path: '/discuss',
      name: 'Discuss',
      component: Discuss
    },
    {
      path: '/discuss/detail/:id',
      name: 'DiscussDetail',
      component: DiscussDetail
    },
    {
      path: '/about',
      name: 'About',
      component: About
    },
    {
      path: '/article',
      name: 'ArticleInfo',
      component: ArticleInfo
    },
    {
      path: '/album',
      name: 'Album',
      component: Album
    },
    {
      path: '/album/detail/:albumId',
      name: 'AlbumDetail',
      component: AlbumDetail
    },
    {
      path: '/lancoll', 
      name: 'LangColle',
      component: LangColle
    },
    {
      path: '/account', 
      name: 'Account',
      component: Account
    },
    {
      path: '/edit', 
      name: 'edit',
      component: Edit
    }
  ]
})

export default router
